package day03;

public class OperDemo1 {
    public static void main(String[] args) {
        System.out.println(5%2);
        System.out.println(8%2);
        //自增，自减运算
        /*
        int a=5,b=5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);
        */
        /*
        int a=5,b=5;
        int c = a++;//将a++的值5赋值给c,同时a自增1变为6
        int d = ++b;//将++b的值6赋值给d,同时b自增1变为6
        System.out.println(a);//6
        System.out.println(b);//6
        System.out.println(c);//5
        System.out.println(d);//6
         */
        /*
        int a =5,b=5;
        int c = a--;//将a--的值5赋值给c,同时a自减1变为4
        int d = --b;//将--b的值4赋值给d,同时b自减1变为4
        System.out.println(a);//4
        System.out.println(b);//4
        System.out.println(c);//5
        System.out.println(d);//4
         */

    }

}
